home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Speccy ClassiX 1998
/
Speccy ClassiX 98.iso
/
amiga_system
/
the_aminet
/
dev
/
gcc
/
libmat.lha
/
src
/
minv.cc
< prev
next >
Wrap
C/C++ Source or Header
|
1980-01-01
|
254b
|
18 lines
// MATRIX LIB
// TOMMY JOHANSSON 1995
#include "matrix.h"
Matrix inv(const Matrix& A)
{
int i,j;
Matrix x(A.n,1);
Matrix C(A.n);
for(i=1;i<=A.n;i++)
{
x=solve(A,e(A.n,i));
for(j=1;j<=A.n;j++)
C.koff[j][i]=x.koff[j][1];
}
return(C);
}